/*
 * @Description:
 * @Version: 2.0
 * @Autor: wangmiao
 * @Date: 2022-08-26 13:46:52
 * @LastEditors: wangmiao
 * @LastEditTime: 2022-08-26 13:47:01
 */
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'
import type { RootState, AppDispatch } from './index'

// use hook 节约每次引入type的工作
// useSelector: 节约配置RootState type

export const useAppDispatch = () => useDispatch<AppDispatch>()
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector
